package day14;

public class MyArray {
    Object[] data = new Object[5];

    int len = 0;
    public void add(Object obj){
        //往data 数组当中添加一个值
        data[len] = obj;
        len++;
    }
    public void  remove(int index){
        //根据下标，删除往data数组里的值
        for (int i = index; i < data.length ; i++) {
            data[i] =data[i+1];

        }
        len--;
    }
    public Object get( int index){
        return data[index];

    }
    //返回真实长度
    public int length(){
        return 0;
    }
}
